import 'package:dartkit/dartkit.dart';
import 'package:test/test.dart';

void main() {
  test("序列化与恢复测试", () {
    final time = DateTime.now();
    final thought = Thought(id: 1, timestamp: time, content: "想法内容");
    final recover = Thought.fromRaw(thought.toJson());
    expect(recover.content, "想法内容");
    expect(recover.timestamp, time);
    expect(recover.id, 1);
  });
}
